<header class="layout head padding-small">
    <a href="javascript:back(true);" class="hBack float-left"></a>
    <h4 class="hTxt float-left text-center text-white">积分明细</h4>
    <a href="javascript:;" id="btnJdkey" class="hHlep float-right"></a>
</header>

<!--积分明细S-->
<div class="margin ">
    <div class="radius-big bg-white padding clearfix margin-bottom ">
        <form action="index.php" method="get">
            <input type="hidden" name="act" value="member_points" />
            <div class="x5 padding-small">
                <select name="stage" class="border-none layout" id="stage">
                    <option value="">全部</option>
                    <option value="regist" <?php if ($_GET['stage'] == 'regist'){echo 'selected=selected';}?>>注册</option>
                    <option value="login" <?php if ($_GET['stage'] == 'login'){echo 'selected=selected';}?>>登陆</option>
                    <option value="comments" <?php if ($_GET['stage'] == 'comments'){echo 'selected=selected';}?>>商品评论</option>
                    <option value="order" <?php if ($_GET['stage'] == 'order'){echo 'selected=selected';}?>>订单消费</option>
                    <option value="system" <?php if ($_GET['stage'] == 'system'){echo 'selected=selected';}?>>积分管理</option>
                    <option value="pointorder" <?php if ($_GET['stage'] == 'pointorder'){echo 'selected=selected';}?>>礼品兑换</option>
                    <option value="app" <?php if ($_GET['stage'] == 'app'){echo 'selected=selected';}?>>积分兑换</option>
                </select>
            </div>
            <div class="float-left"><span class="border-none bg-d60079 text-white padding-small radius " onclick="pclicked('index.php?act=member_points&stage='+$('#stage').val());">搜索</span></div>
            <span class="float-right text-red padding-small">总积分：<?php echo $output['member_info']['member_points']?></span>
        </form>
    </div>
    <table class="radius-big layout padding bg-white points-list">
        <thead class="layout">
        <tr class="border-bottom layout">
            <th class="x3">添加时间</th>
            <th class="x3">积分变更</th>
            <th class="x3">操作</th>
            <th class="x3">描述</th>
        </tr>
        </thead>
        <?php  if (count($output['list_log'])>0) { ?>
        <tbody class="layout">
        <?php foreach($output['list_log'] as $val) { ?>
        <tr class="layout">
            <td class="text-small"><?php echo @date('Y-m-d',$val['pl_addtime']);?></td>
            <td><?php echo ($val['pl_points'] > 0 ? '+' : '').$val['pl_points']; ?></td>
            <td><?php
                switch ($val['pl_stage']){
                    case 'regist':
                        echo '注册';
                        break;
                    case 'login':
                        echo '登陆';
                        break;
                    case 'comments':
                        echo '商品评论';
                        break;
                    case 'order':
                        echo '订单消费';
                        break;
                    case 'system':
                        echo '积分管理';
                        break;
                    case 'pointorder':
                        echo '礼品兑换';
                        break;
                    case 'app':
                        echo '积分兑换';
                        break;
                }
                ?></td>
            <td><?php echo $val['pl_desc'];?></td>
        </tr>
        <?php }?>
        </tbody>
    </table>
    <?php require_once 'page.php';?>
        <?php }else{ ?>
                </table>
          <!--无内容S-->
            <div class="noTxt text-center text-gray padding-large">
                <i class="icon-meh-o"></i>
                <p>此操作没有记录</p>
            </div>
                    <!--无内容E--></td>
        <?php } ?>
</div>
<!--积分明细E-->